<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

namespace Wilead\IArtistBundle\Entity;

use Doctrine\ORM\Mapping as ORM;
use Gedmo\Mapping\Annotation as Gedmo;
use Symfony\Component\Validator\Constraints as Assert;
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;

/**
 * @ORM\Table()
 * @ORM\Entity(repositoryClass="Wilead\IArtistBundle\Repository\UserAlbumsRepository")
 * @UniqueEntity({"url", "User"})
 */
class UserAlbums {

    /**
     * @ORM\Column(type="integer")
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="IDENTITY")
     */
    private $id;

    /**
     * @ORM\Column(type="string")
     * @Assert\NotBlank()
     */
    private $thumbnailsUrl;

    /**
     * @ORM\Column(type="string")
     * @Assert\NotBlank()
     */
    private $url;

    /**
     * @ORM\Column(type="text", nullable=true)
     */
    private $description;

    /**
     * @Gedmo\Timestampable(on="create")
     * @ORM\Column(type="datetime")
     */
    private $created;

    /**
     * @Gedmo\Timestampable(on="update")
     * @ORM\Column(type="datetime")
     */
    private $updated;

    /**
     * @ORM\ManyToOne(targetEntity="User", inversedBy="UserAlbums")
     * @ORM\JoinColumn(name="userId", referencedColumnName="id", nullable=false)
     * */
    private $User;

    /**
     * Get id
     *
     * @return integer 
     */
    public function getId() {
        return $this->id;
    }

    /**
     * Set thumbnailsUrl
     *
     * @param string $thumbnailsUrl
     * @return UserAlbums
     */
    public function setThumbnailsUrl($thumbnailsUrl) {
        $this->thumbnailsUrl = $thumbnailsUrl;

        return $this;
    }

    /**
     * Get thumbnailsUrl
     *
     * @return string 
     */
    public function getThumbnailsUrl() {
        return $this->thumbnailsUrl;
    }

    /**
     * Set url
     *
     * @param string $url
     * @return UserAlbums
     */
    public function setUrl($url) {
        $this->url = $url;

        return $this;
    }

    /**
     * Get url
     *
     * @return string 
     */
    public function getUrl() {
        return $this->url;
    }

    /**
     * Set description
     *
     * @param string $description
     * @return UserAlbums
     */
    public function setDescription($description) {
        $this->description = $description;

        return $this;
    }

    /**
     * Get description
     *
     * @return string 
     */
    public function getDescription() {
        return $this->description;
    }

    /**
     * Set created
     *
     * @param \DateTime $created
     * @return UserAlbums
     */
    public function setCreated($created) {
        $this->created = $created;

        return $this;
    }

    /**
     * Get created
     *
     * @return \DateTime 
     */
    public function getCreated() {
        return $this->created;
    }

    /**
     * Set updated
     *
     * @param \DateTime $updated
     * @return UserAlbums
     */
    public function setUpdated($updated) {
        $this->updated = $updated;

        return $this;
    }

    /**
     * Get updated
     *
     * @return \DateTime 
     */
    public function getUpdated() {
        return $this->updated;
    }

    /**
     * Set User
     *
     * @param \Wilead\IArtistBundle\Entity\User $user
     * @return UserAlbums
     */
    public function setUser(\Wilead\IArtistBundle\Entity\User $user) {
        $this->User = $user;

        return $this;
    }

    /**
     * Get User
     *
     * @return \Wilead\IArtistBundle\Entity\User 
     */
    public function getUser() {
        return $this->User;
    }

}